<?php

namespace App\Http\Requests\Home;

use App\Http\Requests\ApiRequest;

/**
 * @property int per_page
 * @property int article_type_id
 */
class SolutionCaseIndexRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'article_type_id' => 'sometimes|numeric'
        ];
    }

    /**
     * @return array
     */
    public function messages()
    {
        return [
            'article_type_id.*' => '文章的类别必须是数值'
        ];
    }
}
